<?php
/*
	本插件：$this->model('model')->方法名();
	其他地方调用：model('jy_wxappjiaoyi/model')->方法名();
*/
namespace jy_wxappjiaoyi;
defined('BY_JYA') or exit('error');
class model extends \plugin{
	public function upexpress(){
		$list=$this->model('wxapp_api')->get_company_list();
		foreach($list as $item){
			$isadd=pdo_get('jy_wxappjiaoyi_express',array('name'=>$item['delivery_id']));
			$data=array(
				'title'=>trim($item['delivery_name']),
				'name'=>trim($item['delivery_id']),
			);
			$id=intval($isadd['id']);
			if($id){
				continue;
			}else{	
				$data['uniacid']=$_SESSION['uniacid'];
				pdo_insert('jy_wxappjiaoyi_express',$data);
			}
		}
		return true;
	}
}
?>